<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
        xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:sec="http://www.springframework.org/security/facelets/tags" >
<h:head>
    <title>Menu Sistema</title>
    <!--
    <h:outputScript library="js" name="tratardados.js" />
    <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"  />
    <p:dialog modal="true" widgetVar="statusDialog" header="Aguarde..." draggable="false" closable="true" resizable="false" width="252" >
        <h:graphicImage library="imagens" name="ajaxloadingbar.gif" />
    </p:dialog>
    -->
</h:head>
<h:body>
<h:form>
    <h:panelGrid columns="1" width="100%" >
        <sec:ifAnyGranted roles="ROLE_ADMINISTRADOR" > 
        <p:menubar autoSubmenuDisplay="true">
            <p:menuitem value="Página Principal" action="/restrito/pagina_principal.xhtml" immediate="true"  ajax="false" icon="ui-icon ui-icon-home" />
            <!-- <p:menuitem value="Atualizar Página" action="window.opener.location.reload();" immediate="true"  ajax="false" icon="ui-icon ui-icon-refresh" /> -->
            <p:menuitem value="Usuários" action="/admin/lista_usuarios.xhtml" immediate="true"  ajax="false" icon="ui-icon ui-icon-person" />
            <p:submenu label="Processos" icon="ui-icon ui-icon-clipboard" >
                <p:menuitem value="Cadastrar" action="/restrito/processo/cadastrar/cadastro_processo.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-plus" />
                <p:menuitem value="Manter" action="/restrito/processo/manter/manter_processos.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-document" />
                <p:menuitem value="Consultar" action="/restrito/processo/consultar/consulta_processos.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-folder-open" />
                <p:menuitem value="No Setor" action="/restrito/processo/nosetor/processos_nosetor.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-transferthick-e-w" />
            </p:submenu>
            <p:submenu label="Entidades" icon="ui-icon ui-icon-flag" >
                <p:menuitem value="Unidades" action="/admin/unidade_militar.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-star" />
                <p:menuitem value="Setores" action="/admin/setor.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-link" />
            </p:submenu>
            <p:menuitem value="Configurações" action="/admin/configuracoes.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-wrench" />
            <p:menuitem value="Sobre" onclick="sobre.show()" icon="ui-icon ui-icon-info" immediate="true" />
            <!-- 
            <p:submenu label="Ajuda" icon="ui-icon ui-icon-help" > 
                <p:menuitem value="Sobre" onclick="sobre.show()"  icon="ui-icon ui-icon-info" />
                <p:menuitem value="Manual on-line" url="/manual/index.html" process="@form" icon="ui-icon ui-icon-document" target="_blank" />
            </p:submenu>
            -->
            <p:menuitem value="Sair" url="#{facesContext.externalContext.requestContextPath}/j_spring_security_logout" immediate="true" ajax="false" icon="ui-icon ui-icon-closethick" global="true"/>
        </p:menubar>
    </sec:ifAnyGranted>
    <sec:ifAnyGranted roles="ROLE_PROTOCOLISTA" > 
        <p:menubar autoSubmenuDisplay="true">
            <p:menuitem value="Página Principal" action="/restrito/pagina_principal.xhtml" immediate="true"  ajax="false" icon="ui-icon ui-icon-home" />
            <!-- <p:menuitem value="Atualizar Página" action="window.opener.location.reload();" immediate="true"  ajax="false" icon="ui-icon ui-icon-refresh" /> -->
            <p:menuitem value="Usuário" action="#{usuarioBean.editarUsuarioConvencional()}" immediate="true" ajax="false" icon="ui-icon ui-icon-person" />
            <p:submenu label="Processos" icon="ui-icon ui-icon-clipboard" >
                <p:menuitem value="Cadastrar" action="/restrito/processo/cadastrar/cadastro_processo.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-plus" />
                <p:menuitem value="Manter" action="/restrito/processo/manter/manter_processos.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-document" />
                <p:menuitem value="Consultar" action="/restrito/processo/consultar/consulta_processos.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-folder-open" />
                <p:menuitem value="No Setor" action="/restrito/processo/nosetor/processos_nosetor.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-transferthick-e-w" />
            </p:submenu>
            <p:submenu label="Entidades" icon="ui-icon ui-icon-flag" >
                <p:menuitem value="Unidades" action="/admin/unidade_militar.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-star" />
                <p:menuitem value="Setores" action="/admin/setor.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-link" />
            </p:submenu>
            <p:menuitem value="Configurações" action="/admin/configuracoes.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-wrench" />
            <p:menuitem value="Sobre" onclick="sobre.show()" icon="ui-icon ui-icon-info" immediate="true" />
            <p:menuitem value="Sair" url="#{facesContext.externalContext.requestContextPath}/j_spring_security_logout" immediate="true" ajax="false" icon="ui-icon ui-icon-closethick" global="true"/>
        </p:menubar>
    </sec:ifAnyGranted>
    <sec:ifAnyGranted roles="ROLE_CONVENCIONAL">
        <p:menubar autoSubmenuDisplay="true">
            <p:menuitem value="Página Principal" action="/restrito/pagina_principal.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-home" />
            <!-- <p:menuitem value="Atualizar Página" action="window.opener.location.reload();" immediate="true"  ajax="false" icon="ui-icon ui-icon-refresh" /> -->
            <p:menuitem value="Usuário" action="#{usuarioBean.editarUsuarioConvencional()}" immediate="true" ajax="false" icon="ui-icon ui-icon-person" />
            <p:submenu label="Processos" icon="ui-icon ui-icon-clipboard" >
                <p:menuitem value="Consultar" action="/restrito/processo/consultar/consulta_processos.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-folder-open" />
                <p:menuitem value="No Setor" action="/restrito/processo/nosetor/processos_nosetor.xhtml" immediate="true" ajax="false" icon="ui-icon ui-icon-transferthick-e-w" />
            </p:submenu>
            <p:menuitem value="Sobre" onclick="sobre.show()" icon="ui-icon ui-icon-info" immediate="true" />
            <p:menuitem value="Sair" url="#{facesContext.externalContext.requestContextPath}/j_spring_security_logout" immediate="true" ajax="false" icon="ui-icon ui-icon-closethick" global="true"/>
        </p:menubar>
    </sec:ifAnyGranted>
</h:panelGrid>
</h:form>
<p:dialog widgetVar="sobre" styleClass="sobre" header="Sobre o SISPAC" width="660" height="330" modal="true" visible="false" resizable="false" showEffect="clip" hideEffect="clip" >  
    <h:form>
        <h:panelGroup>
            <h:panelGrid columns="2" cellpadding="4" bgcolor="skyblue" width="100%" >
            <h:panelGroup>
                <center>
                    <br />
                    <p:graphicImage url="../resources/imagens/dirint_escudo.jpg" width="200" height="170" alt="logo_sdpp" /> 
                    <br />
                    <h:outputLabel value="SDPP" style="font-size: 16px; font-weight: bold" />
                    <br />
                    <h:outputLabel value="Subdiretoria de Pagamento de Pessoal" style="font-size: 12px; " />
                    <br />
                    <h:outputLabel value="Seção de Tecnologia da Informação" style="font-size: 12px; " />
                </center>
            </h:panelGroup>
            <h:panelGroup style="color: black;" >
                <h:outputLabel value="SISPAC" style="font-size: 28px; font-weight: bold"  />
                <br />
                <br />
                <h:outputText value="SISPAC - Sistema de Pagamento de Auxiliares Civis" style="font-size: 14px;" />
                <br />
                <h:outputText value="Versão: 1.0" style="font-size: 14px;" />
                <br />
                <h:outputText value="Plataforma: Java" style="font-size: 14px;" />
                <br />
                <h:outputText value="Database: PostgreSql" style="font-size: 14px;" />
                <br />
                <h:outputLabel value="Contato: " style="font-size: 14px;" /><h:outputLabel value="sistemas@sdpp.intraer" style="color: red; font-size: 12px" />
                <br />
                <br />
                <h:outputText value="Desenvolvido por: " style="font-size: 14px; font-weight: bold" /><h:outputLabel value="Equipe Bravo" style="font-size: 14px;" />
                <br />
                <br />
            </h:panelGroup>
        </h:panelGrid>
        </h:panelGroup>
        <h:panelGroup>
            <center>
                <br />
                <h:outputLabel style="font-weight: bold;" value="&copy; Copyright - Todos os direitos reservados" />
                <br />
            </center>
        </h:panelGroup>
    </h:form>
</p:dialog>
</h:body>
</html>
